<template>
  <div>
  <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect" >
    <el-menu-item index="1">论坛后台管理</el-menu-item>
    <el-submenu index="2" class="adminbox">
        <template slot="title">Admin</template>
        <el-menu-item index="2-1">退出登录</el-menu-item>
    </el-submenu>
  </el-menu>
  </div>
</template>

<script>
 export default {
    data() {
      return {
        activeIndex: '1',
        activeIndex2: '1'
      };
    },
    methods: {
      handleSelect(key, keyPath) {
        console.log(key, keyPath);
      }
    }
  }
</script>

<style  scoped>
.el-menu-demo{
  display: flex;
  flex-direction: row;
  position: relative;
}
.adminbox{
  position: absolute;
  top: 0px;
  right: 10px;
}
</style>
